package spring.library.LibraryProject.model;

import lombok.Data;

import java.util.List;

@Data
public class pageResponse<T> {
    private int currentPage = 1;
    private int pageSize = 10;
    private int offSet;//当前页的启示数据索引

    private List<T> books;
    private int totalPages;

    private boolean connection=true;

    public int getOffSet() {
        return (currentPage-1) * pageSize;
    }
}
